﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Yamfinder.Web.Models
{
    public class NewUserModel
    {
        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email address")]
        [MinLength(6)]
        public string Username { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "First name")]
        [MinLength(3)]
        public string Firstname { get; set; }

        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Surname")]
        [MinLength(3)]
        public string Lastname { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        [MinLength(6)]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
    }
}